perm filename BUGMF.LST[MF,DEK] blob sn#761925 filedate 1984-07-18 generic text, type T, neo UTF8
  1) BUGMF.CH[MF,DEK] and 2) BUGMF.CH[1,DRF]	7-18-84 09:51	pages 1,1

**** File 1) BUGMF.CH[MF,DEK]/1P/1L
1)	COMMENT ⊗   VALID 00038 PAGES
1)	C REC  PAGE   DESCRIPTION
**** File 2) BUGMF.CH[1,DRF]/1P/1L
2)	COMMENT ⊗   VALID 00039 PAGES
2)	C REC  PAGE   DESCRIPTION
***************


**** File 1) BUGMF.CH[MF,DEK]/1P/9L
1)	C00013 00007	@x Compile-time constants:
1)	C00021 00008	@x TANGLE-time constants:
1)	C00024 00009	@x System-dependent character set changes:
1)	C00026 00010	@x Opening files:
1)	C00031 00011	@x New input_ln:
1)	C00038 00012	@x Terminal I/O:
1)	C00041 00013	@x Special terminal controls:
1)	C00043 00014	@x Initializing the terminal:
1)	C00049 00015	@x Making special characters printable:
1)	C00050 00016	@x Terminal input:
1)	C00052 00017	@x The `E' option:
1)	C00056 00018	@x Changes for 36-bit machines:
1)	C00058 00019	@x Eliminating addition/subtraction of zero:
1)	C00061 00020	@x Date and time:
1)	C00063 00021	@x Special classes for SAIL character set goodies
1)	C00067 00022	@x Screen routines:
1)	C00075 00023	@x Page number maintenance:
1)	C00077 00024	@x Printing the page number:
1)	C00078 00025	@x More page number maintenance:
1)	C00081 00026	@x Pausing on input:
1)	C00087 00027	@x Parsing file names:
1)	C00098 00028	@x Printing file names:
1)	C00099 00029	@x Converting file names to PASCAL strings:
1)	C00102 00030	@x Parsing file names in the buffer:
1)	C00109 00031	@x The real file names:
1)	C00113 00032	@x Line editor gets misspelled file name:
1)	C00115 00033	@x Reading the first line of a file:
1)	C00117 00034	@x Opening the TFM file:
1)	C00118 00035	@x The GF output buffer:
1)	C00122 00036	@x "r GFtoDVI":
1)	C00125 00037	@x The endgame:
1)	C00130 00038	@x Final system-dependent changes:
1)	C00143 ENDMK
1)	C⊗;
**** File 2) BUGMF.CH[1,DRF]/1P/9L
2)	C00014 00007	@x Compile-time constants:
2)	C00022 00008	@x TANGLE-time constants:
2)	C00025 00009	@x System-dependent character set changes:
  1) BUGMF.CH[MF,DEK] and 2) BUGMF.CH[1,DRF]	7-18-84 09:51	pages 1,1

2)	C00027 00010	@x Opening files:
2)	C00032 00011	@x New input_ln:
2)	C00039 00012	@x Terminal I/O:
2)	C00042 00013	@x Special terminal controls:
2)	C00044 00014	@x Initializing the terminal:
2)	C00050 00015	@x Making special characters printable:
2)	C00051 00016	@x Terminal input:
2)	C00053 00017	@x The `E' option:
2)	C00057 00018	@x Changes for 36-bit machines:
2)	C00059 00019	@x Eliminating addition/subtraction of zero:
2)	C00062 00020	@x Date and time:
2)	C00064 00021	@x Special classes for SAIL character set goodies
2)	C00068 00022	@x Screen routines:
2)	C00076 00023	@x Page number maintenance:
2)	C00078 00024	@x Printing the page number:
2)	C00079 00025	@x More page number maintenance:
2)	C00082 00026	@x Pausing on input:
2)	C00088 00027	@x Parsing file names:
2)	C00099 00028	@x Printing file names:
2)	C00100 00029	@x Converting file names to PASCAL strings:
2)	C00103 00030	@x Parsing file names in the buffer:
2)	C00110 00031	@x The real file names:
2)	C00114 00032	@x Line editor gets misspelled file name:
2)	C00116 00033	@x Reading the first line of a file:
2)	C00118 00034	@x Opening the TFM file:
2)	C00119 00035	@x The GF output buffer:
2)	C00123 00036	@x "r GFtoDVI":
2)	C00124 00037	@x start/stop counting
2)	C00126 00038	@x The endgame:
2)	C00131 00039	@x Final system-dependent changes:
2)	C00144 ENDMK
2)	C⊗;
***************


**** File 1) BUGMF.CH[MF,DEK]/4P/14L
1)	@d debug== {yes we are debugging}
**** File 2) BUGMF.CH[1,DRF]/4P/14L
2)	Moreover, this version of \MF\ has been instrumented so that runtime
2)	frequency counts can be accumulated from by a single user of \MF\ over a
2)	period of time. Such code is delimited by `$|freq|\ldots|qerf|$'.
2)	@d debug== {yes we are debugging}
***************


**** File 1) BUGMF.CH[MF,DEK]/4P/25L
1)	@z
**** File 2) BUGMF.CH[1,DRF]/4P/29L
  1) BUGMF.CH[MF,DEK] and 2) BUGMF.CH[1,DRF]	7-18-84 09:51	pages 4,4

2)	@#
2)	@d freq==   {change this to `$\\{freq}\equiv\.{@@\{}$' when not
2)		accumulating frequency counts}
2)	@d qerf==       {change this to `$\\{qerf}\equiv\.{@@\}}$' when not
2)		accumulating frequency counts}
2)	@f freq==begin
2)	@f qerf==end
2)	@z
***************


**** File 1) BUGMF.CH[MF,DEK]/6P/9L
1)	{the `|W+|' switch catches more syntax errors}
**** File 2) BUGMF.CH[1,DRF]/6P/9L
2)	@!freq @{@&$D:7@}@+ qerf {and even the frequency counters}
2)	{the `|W+|' switch catches more syntax errors}
***************


**** File 1) BUGMF.CH[MF,DEK]/6P/12L
1)	@z
**** File 2) BUGMF.CH[1,DRF]/6P/13L
2)	{the `\ignorespaces|D:2|' augments debugger to maintain counters}
2)	@z
***************


**** File 1) BUGMF.CH[MF,DEK]/7P/57L
1)	@z
**** File 2) BUGMF.CH[1,DRF]/7P/57L
2)	@!count_name='<!MF!>.TXT[TEX,SYS]    '; {frequency counts go here}
2)	@z
***************


**** File 1) BUGMF.CH[MF,DEK]/37P/1L
1)	@x The endgame:
**** File 2) BUGMF.CH[1,DRF]/37P/1L
2)	@x start/stop counting
2)	@p begin @!{|start_here|}
2)	@y
2)	@p begin @!{|start_here|}
2)	@!freq magic_begin;@+qerf
2)	@z
2)	@x
2)	final_end: ready_already←0;
2)	@y
2)	final_end: ready_already←0;
  1) BUGMF.CH[MF,DEK] and 2) BUGMF.CH[1,DRF]	7-18-84 09:51	pages 37,37

2)	@!freq magic_end;@+qerf
2)	@z
2)	@x The endgame:
***************


**** File 1) BUGMF.CH[MF,DEK]/38P/24L
1)	@ Here's a global variable that's needed for our ESC/BREAK hack.
**** File 2) BUGMF.CH[1,DRF]/39P/24L
2)	@ The frequency counting system follows.
2)	@↑Fuchs, David Raymond@>
2)	@ Frequency counts go to a special file.
2)	@<Glob...@>=
2)	@!freq @!count_file:alpha_file; {the number of counts, followed by their values}
2)	qerf
2)	@ Here's a type that facilitates system hackery. (\MF\ doesn't actually
2)	use all of these variants.)
2)	@d dec_word==packed record
2)		case integer of
2)		0: (@!xx:0..777777@&B; @!p: ↑integer);
2)		1: (@!z: integer);
2)		2: (@!lh:0..777777@&B; @!rh:0..777777@&B);
2)		3: (@!sixbit: packed array[1..6] of 0..@'77)
2)		end
2)	@<Glob...@>=
2)	@!hack,@!memry: dec_word; {two more temporaries}
2)	@!num_counts: integer; {number of counters}
2)	@!job_hrl: integer; {highest address of this job}
2)	@ We can look through memory for counters with some trickery.
2)	@<Get ready to look for count locations@>=
2)	hack.z←@'115; hack.z←hack.p↑; job_hrl←hack.rh;
2)	memry.z←@'400000; {set up memory search}
2)	@ Here's how to locate the next counters.  We leave a pointer to its
2)	location in |memry|, and return |false| if there are no more.
2)	@d AOSA_code==@'354000 {machine-language op code for \.{AOSA}}
2)	@<Last-minute procedures@>=
2)	@!freq function next_count: boolean;
2)	label done;
2)	begin
2)	next_count←true;
2)	while memry.z<job_hrl do
2)		begin
2)		incr(memry.z);
2)		hack.z←memry.p↑;
2)		if (hack.lh=AOSA_code) and (hack.rh=memry.z+1) then
2)			begin incr(memry.z); {skip to the counter}
2)			goto done;
2)			end;
  1) BUGMF.CH[MF,DEK] and 2) BUGMF.CH[1,DRF]	7-18-84 09:51	pages 38,39

2)		end;
2)	next_count←false;
2)	done:
2)	end;
2)	qerf
2)	@ The procedure |magic_begin| reads in the old counts, if any.
2)	@<Last-minute procedures@>=
2)	@!freq procedure magic_begin;
2)	var @!success: boolean; {temporary}
2)	@!i:integer;
2)	begin
2)	@<Get ready to look for count locations@>;
2)	@<Read in the old counts, if possible@>;
2)	end;
2)	qerf
2)	@ We have to simultaniously read in counts and find where in memory
2)	they go.
2)	@<Read in the old counts, if possible@>=
2)	reset(count_file,count_name,'/O'); {set up count file}
2)	if not eof(count_file) then
2)		begin
2)		read_ln(count_file,num_counts);
2)		write_ln(term_out,'Reading in ',num_counts:1,' counts');
2)		i←0;
2)		while not eof(count_file) do begin
2)			success←next_count;
2)			read_ln(count_file,memry.p↑);
2)			incr(i);
2)			end;
2)		close(count_file);
2)		if success then success←not next_count; {shouldn't be any more counts}
2)		if num_counts≠i then success←false;
2)		if not success then begin
2)			write_ln(term_out,'Bad counter file length');
2)			goto final_end;
2)			end;
2)		end
2)	else begin
2)		num_counts←0;
2)		while next_count do incr(num_counts);
2)		write_ln(term_out,'Initializing ',num_counts:1,' zero counts');
2)		end;
2)	@ The procedure |magic_end| writes out the new counts.
2)	@<Last-minute procedures@>=
2)	@!freq procedure magic_end;
2)	begin
2)	@<Get ready to look for count locations@>;
2)	@<Write out a new count file@>;
  1) BUGMF.CH[MF,DEK] and 2) BUGMF.CH[1,DRF]	7-18-84 09:51	pages 38,39

2)	end;
2)	qerf
2)	@ @<Write out a new count file@>=
2)	@<Get ready to look for count locations@>;
2)	rewrite(count_file,count_name); {now we'll write out the counts}
2)	write_ln(term_out);
2)	write_ln(term_out,'Writing ',num_counts:1,' count file');
2)	write_ln(count_file,num_counts);
2)	while next_count do write_ln(count_file,memry.p↑:1);
2)	close(count_file);
2)	@ Here's a global variable that's needed for our ESC/BREAK hack.
***************